<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>js控制语句</title>
    <script>
        // if 语句
        var score = 70;
        if (score >= 60) {
            // alert("及格");
            console.log("及格")  // js控制台输出信息
        }
        else if (score >=70){

        }
        else {

        }

        // switch 语句
        var level = 1
        var msg = ""
        switch(level) {
            case 1:
                msg = "普通会员";
            case 2:
                msg = "VIP";
            default:
                msg = "其它情况"
        }
        console.log(msg);

        //for 循环
        for(var i=0; i<10; i++){
            console.log(i)
            document.write(i+"<br>")
        }

        //while循环
        var i = 0;
        while (i<10){
            console.log(i)
            i++;
        }

        //break continue
         for(var i=0; i<10; i++){
             if (i==3) {continue};
             document.write(i+"<br>");
             // break
         }
    </script>
</head>
<body>

</body>
</html>